package com.aacar.dao.impl;

import com.aacar.dao.OrderDemandDao;
import com.aacar.dao.OrderPayDao;
import com.aacar.dao.base.CommonBaseDao;
import com.aacar.entity.OrderDemand;
import com.aacar.entity.OrderPay;
import com.aacar.entity.SendOrder;
import org.springframework.stereotype.Repository;

@Repository("orderPayDao")
public class OrderPayDaoImpl extends CommonBaseDao<OrderPay, String> implements OrderPayDao {

	private static final String nameSpace = "com.aacar.dao.OrderPayDao.";


	@Override
	public int save(OrderPay orderPay) {
		return saveObject(nameSpace.concat("save"), orderPay);
	}

	@Override
	public int update(OrderPay orderPay) {
		return super.getSqlSession().update(nameSpace.concat("update"), orderPay);
	}

	@Override
	public OrderPay getOrderPay(String payOrderNo) {
		return super.getSqlSession().selectOne(nameSpace.concat("getOrderPay"), payOrderNo);

	}

	@Override
	public int saveSendOrder(SendOrder sendOrder) {
		return super.getSqlSession().insert(nameSpace.concat("saveSendOrder"), sendOrder);
	}

	@Override
	public SendOrder getSendOrder(SendOrder sendOrder) {
		return super.getSqlSession().selectOne(nameSpace.concat("getSendOrder"), sendOrder);

	}
}
